<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
    <meta charset="UTF-8">
    <title>angular-ngRepeat</title>
    <link href="../app/bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
</head>
<body ng-controller="Controller">

<ul>
    <li ng-repeat="user in users">
        {{user.name}}
    </li>
</ul>


<table border="1">
    <tbody>
    <tr ng-repeat-start="l in list">
        <td>{{l.name}}</td>
        <td></td>
    </tr>
    <tr ng-repeat-end>
        <td>{{l.age}}</td>
        <td>{{l.gender}}</td>
    </tr>
    </tbody>
</table>

<script src="../app/bower_components/jquery/dist/jquery.js"></script>
<script src="../app/bower_components/angular/angular.js"></script>

<script>
    var testapp = angular.module('app', []);
    testapp.controller('Controller', function ($rootScope, $scope) {
        $rootScope.xx = 'xx';
        $rootScope.list = [{name: '张三', age: 26, gender: '男'}, {name: '李四', age: 24, gender: '男'}];

        $scope.users = [{
            name: '123'
        }];
    });
    testapp.directive('abc', function () {
        return {
            restrict: 'ACE',
            link: function (scope, element, attrs) {
                element.addClass('btn btn-primary');
            }
        }
    });

</script>
</body>
</html>